package com.ch.home.bean;

/**
 * 收藏记录
 * Created by CHEN on 2019/8/24.
 */
public class Collect {
    private Integer collectId;
    private Integer UserId;
    private  Integer dishId;

    public Collect() {
    }

    public Collect(Integer collectId, Integer userId, Integer dishId) {

        this.collectId = collectId;
        UserId = userId;
        this.dishId = dishId;
    }

    public Integer getCollectId() {
        return collectId;
    }

    public void setCollectId(Integer collectId) {
        this.collectId = collectId;
    }

    public Integer getUserId() {
        return UserId;
    }

    public void setUserId(Integer userId) {
        UserId = userId;
    }

    public Integer getDishId() {
        return dishId;
    }

    public void setDishId(Integer dishId) {
        this.dishId = dishId;
    }

    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass( ) != o.getClass( )) return false;

        Collect collect = (Collect) o;

        if (collectId != null ? !collectId.equals(collect.collectId) : collect.collectId != null) return false;
        if (UserId != null ? !UserId.equals(collect.UserId) : collect.UserId != null) return false;
        return dishId != null ? dishId.equals(collect.dishId) : collect.dishId == null;
    }

    @Override
    public int hashCode() {
        int result = collectId != null ? collectId.hashCode( ) : 0;
        result = 31 * result + (UserId != null ? UserId.hashCode( ) : 0);
        result = 31 * result + (dishId != null ? dishId.hashCode( ) : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Collect{" +
                "collectId=" + collectId +
                ", UserId=" + UserId +
                ", dishId=" + dishId +
                '}';
    }
}
